import { defineStore } from 'pinia'
import { doGetRoleList } from '@/api/role'

const useRoleStore = defineStore('roleStore', {
  state: () => ({
    roleList: []
  }),
  actions: {
   async getRoleList() {
      doGetRoleList().then(res => {
        this.roleList = res.role_list
      }).catch(err => {
        console.log(err)
      })
    }
  }
})

export default useRoleStore
